package org.nanfang.shuiguo;

import java.util.Arrays;
import java.util.Random;

/*
* 水果 - 给女孩子提供各种类型的水果
* */
public class Fruit {
    //希望给女孩的水果品类 - 随即给出
    private String[] fruitArray = {"苹果","香蕉","水梨","草莓","西瓜"};
    //存放数组随机的下标索引
    private int index ;
    public Fruit() {
        this.index = new Random().nextInt(fruitArray.length) ;
    }
    @Override
    public String toString() {
        return fruitArray[index];
    }
}
